// $ANTLR 3.2 Sep 23, 2009 12:02:23 D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g 2010-01-17 17:18:31

package ch.kynlang.compiler;
import ch.kynlang.compiler.tree.*;
import ch.kynlang.compiler.symbol.*;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;

import org.antlr.runtime.tree.*;

public class KohYaoNoiParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "PBODY", "PROPERTY", "WBODY", "WIDGET", "BOOL", "VARACC", "METACC", "ARGLIST", "PACKAGE", "SEMI", "IMPORT", "AS", "IDENTIFIER", "DEF", "EQ", "HASH", "LPAREN", "COMMA", "RPAREN", "COLON", "LBRACE", "RBRACE", "NEW", "DOT", "TRUE", "FALSE", "INTEGER", "FLOAT", "STRINGLITERAL", "CHARACTERLITERAL", "EscapeSequence", "Letter", "JavaIDDigit", "LBRACKET", "RBRACKET", "WS", "COMMENT", "LINE_COMMENT"
    };
    public static final int INTEGER=30;
    public static final int PACKAGE=12;
    public static final int VARACC=9;
    public static final int DEF=17;
    public static final int RBRACE=25;
    public static final int LINE_COMMENT=41;
    public static final int PBODY=4;
    public static final int LBRACE=24;
    public static final int BOOL=8;
    public static final int NEW=26;
    public static final int HASH=19;
    public static final int WIDGET=7;
    public static final int ARGLIST=11;
    public static final int FLOAT=31;
    public static final int EOF=-1;
    public static final int TRUE=28;
    public static final int SEMI=13;
    public static final int LPAREN=20;
    public static final int LBRACKET=37;
    public static final int COLON=23;
    public static final int AS=15;
    public static final int RPAREN=22;
    public static final int IMPORT=14;
    public static final int WS=39;
    public static final int PROPERTY=5;
    public static final int COMMA=21;
    public static final int STRINGLITERAL=32;
    public static final int IDENTIFIER=16;
    public static final int CHARACTERLITERAL=33;
    public static final int WBODY=6;
    public static final int JavaIDDigit=36;
    public static final int RBRACKET=38;
    public static final int EQ=18;
    public static final int COMMENT=40;
    public static final int DOT=27;
    public static final int FALSE=29;
    public static final int Letter=35;
    public static final int EscapeSequence=34;
    public static final int METACC=10;

    // delegates
    // delegators


        public KohYaoNoiParser(TokenStream input) {
            this(input, new RecognizerSharedState());
        }
        public KohYaoNoiParser(TokenStream input, RecognizerSharedState state) {
            super(input, state);
            this.state.ruleMemo = new HashMap[43+1];
             
             
        }
        
    protected TreeAdaptor adaptor = new CommonTreeAdaptor();

    public void setTreeAdaptor(TreeAdaptor adaptor) {
        this.adaptor = adaptor;
    }
    public TreeAdaptor getTreeAdaptor() {
        return adaptor;
    }

    public String[] getTokenNames() { return KohYaoNoiParser.tokenNames; }
    public String getGrammarFileName() { return "D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g"; }


    private SymbolTable st = null;
    public KohYaoNoiParser(TokenStream input, SymbolTable st) {
      super(input);
      this.st = st;
    }

    public void displayRecognitionError(String[] tokenNames,
                                            RecognitionException re) {
        KynTree kt = new KynTree(re.token);
        
        KohYaoNoiError err = new KohYaoNoiError(kt, super.getErrorMessage(re, tokenNames));
        st.error(err);
        //super.displayRecognitionError(tokenNames, re);
    }


    public static class program_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "program"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:87:1: program : ( packageDef )? ( importDef )* ( macroDef | varDef )* widget ;
    public final KohYaoNoiParser.program_return program() throws RecognitionException {
        KohYaoNoiParser.program_return retval = new KohYaoNoiParser.program_return();
        retval.start = input.LT(1);
        int program_StartIndex = input.index();
        KynTree root_0 = null;

        KohYaoNoiParser.packageDef_return packageDef1 = null;

        KohYaoNoiParser.importDef_return importDef2 = null;

        KohYaoNoiParser.macroDef_return macroDef3 = null;

        KohYaoNoiParser.varDef_return varDef4 = null;

        KohYaoNoiParser.widget_return widget5 = null;



        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 1) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:87:25: ( ( packageDef )? ( importDef )* ( macroDef | varDef )* widget )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:87:27: ( packageDef )? ( importDef )* ( macroDef | varDef )* widget
            {
            root_0 = (KynTree)adaptor.nil();

            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:87:27: ( packageDef )?
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0==PACKAGE) ) {
                alt1=1;
            }
            switch (alt1) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:0:0: packageDef
                    {
                    pushFollow(FOLLOW_packageDef_in_program136);
                    packageDef1=packageDef();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, packageDef1.getTree());

                    }
                    break;

            }

            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:88:29: ( importDef )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0==IMPORT) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:0:0: importDef
            	    {
            	    pushFollow(FOLLOW_importDef_in_program167);
            	    importDef2=importDef();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) adaptor.addChild(root_0, importDef2.getTree());

            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);

            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:89:29: ( macroDef | varDef )*
            loop3:
            do {
                int alt3=3;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==HASH) ) {
                    alt3=1;
                }
                else if ( (LA3_0==DEF) ) {
                    alt3=2;
                }


                switch (alt3) {
            	case 1 :
            	    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:89:30: macroDef
            	    {
            	    pushFollow(FOLLOW_macroDef_in_program199);
            	    macroDef3=macroDef();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) adaptor.addChild(root_0, macroDef3.getTree());

            	    }
            	    break;
            	case 2 :
            	    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:89:41: varDef
            	    {
            	    pushFollow(FOLLOW_varDef_in_program203);
            	    varDef4=varDef();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) adaptor.addChild(root_0, varDef4.getTree());

            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);

            pushFollow(FOLLOW_widget_in_program235);
            widget5=widget();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, widget5.getTree());

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 1, program_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "program"

    public static class packageDef_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "packageDef"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:93:1: packageDef : PACKAGE qualifiedName SEMI ;
    public final KohYaoNoiParser.packageDef_return packageDef() throws RecognitionException {
        KohYaoNoiParser.packageDef_return retval = new KohYaoNoiParser.packageDef_return();
        retval.start = input.LT(1);
        int packageDef_StartIndex = input.index();
        KynTree root_0 = null;

        Token PACKAGE6=null;
        Token SEMI8=null;
        KohYaoNoiParser.qualifiedName_return qualifiedName7 = null;


        KynTree PACKAGE6_tree=null;
        KynTree SEMI8_tree=null;

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 2) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:93:25: ( PACKAGE qualifiedName SEMI )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:93:27: PACKAGE qualifiedName SEMI
            {
            root_0 = (KynTree)adaptor.nil();

            PACKAGE6=(Token)match(input,PACKAGE,FOLLOW_PACKAGE_in_packageDef281); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            PACKAGE6_tree = (KynTree)adaptor.create(PACKAGE6);
            root_0 = (KynTree)adaptor.becomeRoot(PACKAGE6_tree, root_0);
            }
            pushFollow(FOLLOW_qualifiedName_in_packageDef284);
            qualifiedName7=qualifiedName();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, qualifiedName7.getTree());
            SEMI8=(Token)match(input,SEMI,FOLLOW_SEMI_in_packageDef286); if (state.failed) return retval;

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 2, packageDef_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "packageDef"

    public static class importDef_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "importDef"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:96:1: importDef : ( IMPORT qualifiedName AS IDENTIFIER SEMI -> ^( AS IDENTIFIER qualifiedName ) | IMPORT qualifiedName SEMI );
    public final KohYaoNoiParser.importDef_return importDef() throws RecognitionException {
        KohYaoNoiParser.importDef_return retval = new KohYaoNoiParser.importDef_return();
        retval.start = input.LT(1);
        int importDef_StartIndex = input.index();
        KynTree root_0 = null;

        Token IMPORT9=null;
        Token AS11=null;
        Token IDENTIFIER12=null;
        Token SEMI13=null;
        Token IMPORT14=null;
        Token SEMI16=null;
        KohYaoNoiParser.qualifiedName_return qualifiedName10 = null;

        KohYaoNoiParser.qualifiedName_return qualifiedName15 = null;


        KynTree IMPORT9_tree=null;
        KynTree AS11_tree=null;
        KynTree IDENTIFIER12_tree=null;
        KynTree SEMI13_tree=null;
        KynTree IMPORT14_tree=null;
        KynTree SEMI16_tree=null;
        RewriteRuleTokenStream stream_AS=new RewriteRuleTokenStream(adaptor,"token AS");
        RewriteRuleTokenStream stream_IMPORT=new RewriteRuleTokenStream(adaptor,"token IMPORT");
        RewriteRuleTokenStream stream_SEMI=new RewriteRuleTokenStream(adaptor,"token SEMI");
        RewriteRuleTokenStream stream_IDENTIFIER=new RewriteRuleTokenStream(adaptor,"token IDENTIFIER");
        RewriteRuleSubtreeStream stream_qualifiedName=new RewriteRuleSubtreeStream(adaptor,"rule qualifiedName");
        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 3) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:96:25: ( IMPORT qualifiedName AS IDENTIFIER SEMI -> ^( AS IDENTIFIER qualifiedName ) | IMPORT qualifiedName SEMI )
            int alt4=2;
            alt4 = dfa4.predict(input);
            switch (alt4) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:96:27: IMPORT qualifiedName AS IDENTIFIER SEMI
                    {
                    IMPORT9=(Token)match(input,IMPORT,FOLLOW_IMPORT_in_importDef346); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_IMPORT.add(IMPORT9);

                    pushFollow(FOLLOW_qualifiedName_in_importDef348);
                    qualifiedName10=qualifiedName();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_qualifiedName.add(qualifiedName10.getTree());
                    AS11=(Token)match(input,AS,FOLLOW_AS_in_importDef350); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_AS.add(AS11);

                    IDENTIFIER12=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_importDef352); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_IDENTIFIER.add(IDENTIFIER12);

                    SEMI13=(Token)match(input,SEMI,FOLLOW_SEMI_in_importDef354); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_SEMI.add(SEMI13);



                    // AST REWRITE
                    // elements: AS, IDENTIFIER, qualifiedName
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (KynTree)adaptor.nil();
                    // 96:67: -> ^( AS IDENTIFIER qualifiedName )
                    {
                        // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:96:70: ^( AS IDENTIFIER qualifiedName )
                        {
                        KynTree root_1 = (KynTree)adaptor.nil();
                        root_1 = (KynTree)adaptor.becomeRoot(stream_AS.nextNode(), root_1);

                        adaptor.addChild(root_1, stream_IDENTIFIER.nextNode());
                        adaptor.addChild(root_1, stream_qualifiedName.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:97:27: IMPORT qualifiedName SEMI
                    {
                    root_0 = (KynTree)adaptor.nil();

                    IMPORT14=(Token)match(input,IMPORT,FOLLOW_IMPORT_in_importDef392); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    IMPORT14_tree = (KynTree)adaptor.create(IMPORT14);
                    root_0 = (KynTree)adaptor.becomeRoot(IMPORT14_tree, root_0);
                    }
                    pushFollow(FOLLOW_qualifiedName_in_importDef395);
                    qualifiedName15=qualifiedName();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, qualifiedName15.getTree());
                    SEMI16=(Token)match(input,SEMI,FOLLOW_SEMI_in_importDef397); if (state.failed) return retval;

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 3, importDef_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "importDef"

    public static class varDef_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "varDef"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:100:1: varDef : DEF IDENTIFIER EQ value SEMI ;
    public final KohYaoNoiParser.varDef_return varDef() throws RecognitionException {
        KohYaoNoiParser.varDef_return retval = new KohYaoNoiParser.varDef_return();
        retval.start = input.LT(1);
        int varDef_StartIndex = input.index();
        KynTree root_0 = null;

        Token DEF17=null;
        Token IDENTIFIER18=null;
        Token EQ19=null;
        Token SEMI21=null;
        KohYaoNoiParser.value_return value20 = null;


        KynTree DEF17_tree=null;
        KynTree IDENTIFIER18_tree=null;
        KynTree EQ19_tree=null;
        KynTree SEMI21_tree=null;

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 4) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:100:25: ( DEF IDENTIFIER EQ value SEMI )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:100:27: DEF IDENTIFIER EQ value SEMI
            {
            root_0 = (KynTree)adaptor.nil();

            DEF17=(Token)match(input,DEF,FOLLOW_DEF_in_varDef460); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            DEF17_tree = (KynTree)adaptor.create(DEF17);
            root_0 = (KynTree)adaptor.becomeRoot(DEF17_tree, root_0);
            }
            IDENTIFIER18=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_varDef463); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            IDENTIFIER18_tree = (KynTree)adaptor.create(IDENTIFIER18);
            adaptor.addChild(root_0, IDENTIFIER18_tree);
            }
            EQ19=(Token)match(input,EQ,FOLLOW_EQ_in_varDef465); if (state.failed) return retval;
            pushFollow(FOLLOW_value_in_varDef468);
            value20=value();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, value20.getTree());
            SEMI21=(Token)match(input,SEMI,FOLLOW_SEMI_in_varDef470); if (state.failed) return retval;

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 4, varDef_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "varDef"

    public static class macroDef_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "macroDef"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:103:1: macroDef : HASH IDENTIFIER propertyBody ;
    public final KohYaoNoiParser.macroDef_return macroDef() throws RecognitionException {
        KohYaoNoiParser.macroDef_return retval = new KohYaoNoiParser.macroDef_return();
        retval.start = input.LT(1);
        int macroDef_StartIndex = input.index();
        KynTree root_0 = null;

        Token HASH22=null;
        Token IDENTIFIER23=null;
        KohYaoNoiParser.propertyBody_return propertyBody24 = null;


        KynTree HASH22_tree=null;
        KynTree IDENTIFIER23_tree=null;

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 5) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:103:25: ( HASH IDENTIFIER propertyBody )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:103:27: HASH IDENTIFIER propertyBody
            {
            root_0 = (KynTree)adaptor.nil();

            HASH22=(Token)match(input,HASH,FOLLOW_HASH_in_macroDef531); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            HASH22_tree = (KynTree)adaptor.create(HASH22);
            root_0 = (KynTree)adaptor.becomeRoot(HASH22_tree, root_0);
            }
            IDENTIFIER23=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_macroDef534); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            IDENTIFIER23_tree = (KynTree)adaptor.create(IDENTIFIER23);
            adaptor.addChild(root_0, IDENTIFIER23_tree);
            }
            pushFollow(FOLLOW_propertyBody_in_macroDef536);
            propertyBody24=propertyBody();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, propertyBody24.getTree());

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 5, macroDef_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "macroDef"

    public static class macroAccess_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "macroAccess"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:107:1: macroAccess : HASH IDENTIFIER ;
    public final KohYaoNoiParser.macroAccess_return macroAccess() throws RecognitionException {
        KohYaoNoiParser.macroAccess_return retval = new KohYaoNoiParser.macroAccess_return();
        retval.start = input.LT(1);
        int macroAccess_StartIndex = input.index();
        KynTree root_0 = null;

        Token HASH25=null;
        Token IDENTIFIER26=null;

        KynTree HASH25_tree=null;
        KynTree IDENTIFIER26_tree=null;

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 6) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:107:25: ( HASH IDENTIFIER )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:107:27: HASH IDENTIFIER
            {
            root_0 = (KynTree)adaptor.nil();

            HASH25=(Token)match(input,HASH,FOLLOW_HASH_in_macroAccess631); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            HASH25_tree = (KynTree)adaptor.create(HASH25);
            root_0 = (KynTree)adaptor.becomeRoot(HASH25_tree, root_0);
            }
            IDENTIFIER26=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_macroAccess634); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            IDENTIFIER26_tree = (KynTree)adaptor.create(IDENTIFIER26);
            adaptor.addChild(root_0, IDENTIFIER26_tree);
            }

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 6, macroAccess_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "macroAccess"

    public static class propertyBody_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "propertyBody"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:110:1: propertyBody : LPAREN ( property ( COMMA )? )* RPAREN -> ^( PBODY ( property )* ) ;
    public final KohYaoNoiParser.propertyBody_return propertyBody() throws RecognitionException {
        KohYaoNoiParser.propertyBody_return retval = new KohYaoNoiParser.propertyBody_return();
        retval.start = input.LT(1);
        int propertyBody_StartIndex = input.index();
        KynTree root_0 = null;

        Token LPAREN27=null;
        Token COMMA29=null;
        Token RPAREN30=null;
        KohYaoNoiParser.property_return property28 = null;


        KynTree LPAREN27_tree=null;
        KynTree COMMA29_tree=null;
        KynTree RPAREN30_tree=null;
        RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
        RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
        RewriteRuleSubtreeStream stream_property=new RewriteRuleSubtreeStream(adaptor,"rule property");
        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 7) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:110:25: ( LPAREN ( property ( COMMA )? )* RPAREN -> ^( PBODY ( property )* ) )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:110:27: LPAREN ( property ( COMMA )? )* RPAREN
            {
            LPAREN27=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_propertyBody690); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN27);

            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:110:34: ( property ( COMMA )? )*
            loop6:
            do {
                int alt6=2;
                int LA6_0 = input.LA(1);

                if ( (LA6_0==IDENTIFIER||LA6_0==HASH) ) {
                    alt6=1;
                }


                switch (alt6) {
            	case 1 :
            	    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:110:36: property ( COMMA )?
            	    {
            	    pushFollow(FOLLOW_property_in_propertyBody694);
            	    property28=property();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_property.add(property28.getTree());
            	    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:110:45: ( COMMA )?
            	    int alt5=2;
            	    int LA5_0 = input.LA(1);

            	    if ( (LA5_0==COMMA) ) {
            	        alt5=1;
            	    }
            	    switch (alt5) {
            	        case 1 :
            	            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:0:0: COMMA
            	            {
            	            COMMA29=(Token)match(input,COMMA,FOLLOW_COMMA_in_propertyBody696); if (state.failed) return retval; 
            	            if ( state.backtracking==0 ) stream_COMMA.add(COMMA29);


            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop6;
                }
            } while (true);

            RPAREN30=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_propertyBody702); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN30);



            // AST REWRITE
            // elements: property
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (KynTree)adaptor.nil();
            // 110:62: -> ^( PBODY ( property )* )
            {
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:110:65: ^( PBODY ( property )* )
                {
                KynTree root_1 = (KynTree)adaptor.nil();
                root_1 = (KynTree)adaptor.becomeRoot((KynTree)adaptor.create(PBODY, "PBODY"), root_1);

                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:110:73: ( property )*
                while ( stream_property.hasNext() ) {
                    adaptor.addChild(root_1, stream_property.nextTree());

                }
                stream_property.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 7, propertyBody_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "propertyBody"

    public static class property_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "property"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:113:1: property : ( IDENTIFIER COLON value -> ^( PROPERTY IDENTIFIER value ) | macroAccess );
    public final KohYaoNoiParser.property_return property() throws RecognitionException {
        KohYaoNoiParser.property_return retval = new KohYaoNoiParser.property_return();
        retval.start = input.LT(1);
        int property_StartIndex = input.index();
        KynTree root_0 = null;

        Token IDENTIFIER31=null;
        Token COLON32=null;
        KohYaoNoiParser.value_return value33 = null;

        KohYaoNoiParser.macroAccess_return macroAccess34 = null;


        KynTree IDENTIFIER31_tree=null;
        KynTree COLON32_tree=null;
        RewriteRuleTokenStream stream_COLON=new RewriteRuleTokenStream(adaptor,"token COLON");
        RewriteRuleTokenStream stream_IDENTIFIER=new RewriteRuleTokenStream(adaptor,"token IDENTIFIER");
        RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");
        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 8) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:113:25: ( IDENTIFIER COLON value -> ^( PROPERTY IDENTIFIER value ) | macroAccess )
            int alt7=2;
            int LA7_0 = input.LA(1);

            if ( (LA7_0==IDENTIFIER) ) {
                alt7=1;
            }
            else if ( (LA7_0==HASH) ) {
                alt7=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 7, 0, input);

                throw nvae;
            }
            switch (alt7) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:113:27: IDENTIFIER COLON value
                    {
                    IDENTIFIER31=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_property771); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_IDENTIFIER.add(IDENTIFIER31);

                    COLON32=(Token)match(input,COLON,FOLLOW_COLON_in_property773); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_COLON.add(COLON32);

                    pushFollow(FOLLOW_value_in_property775);
                    value33=value();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_value.add(value33.getTree());


                    // AST REWRITE
                    // elements: value, IDENTIFIER
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (KynTree)adaptor.nil();
                    // 113:50: -> ^( PROPERTY IDENTIFIER value )
                    {
                        // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:113:53: ^( PROPERTY IDENTIFIER value )
                        {
                        KynTree root_1 = (KynTree)adaptor.nil();
                        root_1 = (KynTree)adaptor.becomeRoot((KynTree)adaptor.create(PROPERTY, "PROPERTY"), root_1);

                        adaptor.addChild(root_1, stream_IDENTIFIER.nextNode());
                        adaptor.addChild(root_1, stream_value.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:114:27: macroAccess
                    {
                    root_0 = (KynTree)adaptor.nil();

                    pushFollow(FOLLOW_macroAccess_in_property813);
                    macroAccess34=macroAccess();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, macroAccess34.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 8, property_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "property"

    public static class widget_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "widget"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:117:1: widget : wtype= IDENTIFIER wname= IDENTIFIER propertyBody ( widgetBody )? -> ^( WIDGET $wtype $wname propertyBody ( widgetBody )? ) ;
    public final KohYaoNoiParser.widget_return widget() throws RecognitionException {
        KohYaoNoiParser.widget_return retval = new KohYaoNoiParser.widget_return();
        retval.start = input.LT(1);
        int widget_StartIndex = input.index();
        KynTree root_0 = null;

        Token wtype=null;
        Token wname=null;
        KohYaoNoiParser.propertyBody_return propertyBody35 = null;

        KohYaoNoiParser.widgetBody_return widgetBody36 = null;


        KynTree wtype_tree=null;
        KynTree wname_tree=null;
        RewriteRuleTokenStream stream_IDENTIFIER=new RewriteRuleTokenStream(adaptor,"token IDENTIFIER");
        RewriteRuleSubtreeStream stream_propertyBody=new RewriteRuleSubtreeStream(adaptor,"rule propertyBody");
        RewriteRuleSubtreeStream stream_widgetBody=new RewriteRuleSubtreeStream(adaptor,"rule widgetBody");
        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 9) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:117:25: (wtype= IDENTIFIER wname= IDENTIFIER propertyBody ( widgetBody )? -> ^( WIDGET $wtype $wname propertyBody ( widgetBody )? ) )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:117:27: wtype= IDENTIFIER wname= IDENTIFIER propertyBody ( widgetBody )?
            {
            wtype=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_widget877); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_IDENTIFIER.add(wtype);

            wname=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_widget881); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_IDENTIFIER.add(wname);

            pushFollow(FOLLOW_propertyBody_in_widget883);
            propertyBody35=propertyBody();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_propertyBody.add(propertyBody35.getTree());
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:117:74: ( widgetBody )?
            int alt8=2;
            int LA8_0 = input.LA(1);

            if ( (LA8_0==LBRACE) ) {
                alt8=1;
            }
            switch (alt8) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:0:0: widgetBody
                    {
                    pushFollow(FOLLOW_widgetBody_in_widget885);
                    widgetBody36=widgetBody();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_widgetBody.add(widgetBody36.getTree());

                    }
                    break;

            }



            // AST REWRITE
            // elements: wname, widgetBody, propertyBody, wtype
            // token labels: wname, wtype
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleTokenStream stream_wname=new RewriteRuleTokenStream(adaptor,"token wname",wname);
            RewriteRuleTokenStream stream_wtype=new RewriteRuleTokenStream(adaptor,"token wtype",wtype);
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (KynTree)adaptor.nil();
            // 117:86: -> ^( WIDGET $wtype $wname propertyBody ( widgetBody )? )
            {
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:117:89: ^( WIDGET $wtype $wname propertyBody ( widgetBody )? )
                {
                KynTree root_1 = (KynTree)adaptor.nil();
                root_1 = (KynTree)adaptor.becomeRoot((KynTree)adaptor.create(WIDGET, "WIDGET"), root_1);

                adaptor.addChild(root_1, stream_wtype.nextNode());
                adaptor.addChild(root_1, stream_wname.nextNode());
                adaptor.addChild(root_1, stream_propertyBody.nextTree());
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:117:125: ( widgetBody )?
                if ( stream_widgetBody.hasNext() ) {
                    adaptor.addChild(root_1, stream_widgetBody.nextTree());

                }
                stream_widgetBody.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 9, widget_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "widget"

    public static class widgetBody_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "widgetBody"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:120:1: widgetBody : LBRACE ( widget )* RBRACE -> ^( WBODY ( widget )* ) ;
    public final KohYaoNoiParser.widgetBody_return widgetBody() throws RecognitionException {
        KohYaoNoiParser.widgetBody_return retval = new KohYaoNoiParser.widgetBody_return();
        retval.start = input.LT(1);
        int widgetBody_StartIndex = input.index();
        KynTree root_0 = null;

        Token LBRACE37=null;
        Token RBRACE39=null;
        KohYaoNoiParser.widget_return widget38 = null;


        KynTree LBRACE37_tree=null;
        KynTree RBRACE39_tree=null;
        RewriteRuleTokenStream stream_RBRACE=new RewriteRuleTokenStream(adaptor,"token RBRACE");
        RewriteRuleTokenStream stream_LBRACE=new RewriteRuleTokenStream(adaptor,"token LBRACE");
        RewriteRuleSubtreeStream stream_widget=new RewriteRuleSubtreeStream(adaptor,"rule widget");
        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 10) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:120:25: ( LBRACE ( widget )* RBRACE -> ^( WBODY ( widget )* ) )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:120:27: LBRACE ( widget )* RBRACE
            {
            LBRACE37=(Token)match(input,LBRACE,FOLLOW_LBRACE_in_widgetBody949); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LBRACE.add(LBRACE37);

            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:120:34: ( widget )*
            loop9:
            do {
                int alt9=2;
                int LA9_0 = input.LA(1);

                if ( (LA9_0==IDENTIFIER) ) {
                    alt9=1;
                }


                switch (alt9) {
            	case 1 :
            	    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:0:0: widget
            	    {
            	    pushFollow(FOLLOW_widget_in_widgetBody951);
            	    widget38=widget();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_widget.add(widget38.getTree());

            	    }
            	    break;

            	default :
            	    break loop9;
                }
            } while (true);

            RBRACE39=(Token)match(input,RBRACE,FOLLOW_RBRACE_in_widgetBody954); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RBRACE.add(RBRACE39);



            // AST REWRITE
            // elements: widget
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (KynTree)adaptor.nil();
            // 120:49: -> ^( WBODY ( widget )* )
            {
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:120:52: ^( WBODY ( widget )* )
                {
                KynTree root_1 = (KynTree)adaptor.nil();
                root_1 = (KynTree)adaptor.becomeRoot((KynTree)adaptor.create(WBODY, "WBODY"), root_1);

                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:120:60: ( widget )*
                while ( stream_widget.hasNext() ) {
                    adaptor.addChild(root_1, stream_widget.nextTree());

                }
                stream_widget.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 10, widgetBody_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "widgetBody"

    public static class value_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "value"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:123:1: value : ( literal | newObject | variableAccess );
    public final KohYaoNoiParser.value_return value() throws RecognitionException {
        KohYaoNoiParser.value_return retval = new KohYaoNoiParser.value_return();
        retval.start = input.LT(1);
        int value_StartIndex = input.index();
        KynTree root_0 = null;

        KohYaoNoiParser.literal_return literal40 = null;

        KohYaoNoiParser.newObject_return newObject41 = null;

        KohYaoNoiParser.variableAccess_return variableAccess42 = null;



        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:123:25: ( literal | newObject | variableAccess )
            int alt10=3;
            switch ( input.LA(1) ) {
            case TRUE:
            case FALSE:
            case INTEGER:
            case FLOAT:
            case STRINGLITERAL:
            case CHARACTERLITERAL:
                {
                alt10=1;
                }
                break;
            case NEW:
                {
                alt10=2;
                }
                break;
            case IDENTIFIER:
                {
                alt10=3;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 10, 0, input);

                throw nvae;
            }

            switch (alt10) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:123:27: literal
                    {
                    root_0 = (KynTree)adaptor.nil();

                    pushFollow(FOLLOW_literal_in_value1014);
                    literal40=literal();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, literal40.getTree());

                    }
                    break;
                case 2 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:124:27: newObject
                    {
                    root_0 = (KynTree)adaptor.nil();

                    pushFollow(FOLLOW_newObject_in_value1042);
                    newObject41=newObject();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, newObject41.getTree());

                    }
                    break;
                case 3 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:125:27: variableAccess
                    {
                    root_0 = (KynTree)adaptor.nil();

                    pushFollow(FOLLOW_variableAccess_in_value1070);
                    variableAccess42=variableAccess();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, variableAccess42.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 11, value_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "value"

    public static class newObject_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "newObject"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:128:1: newObject : NEW IDENTIFIER LPAREN ( argList )? RPAREN ;
    public final KohYaoNoiParser.newObject_return newObject() throws RecognitionException {
        KohYaoNoiParser.newObject_return retval = new KohYaoNoiParser.newObject_return();
        retval.start = input.LT(1);
        int newObject_StartIndex = input.index();
        KynTree root_0 = null;

        Token NEW43=null;
        Token IDENTIFIER44=null;
        Token LPAREN45=null;
        Token RPAREN47=null;
        KohYaoNoiParser.argList_return argList46 = null;


        KynTree NEW43_tree=null;
        KynTree IDENTIFIER44_tree=null;
        KynTree LPAREN45_tree=null;
        KynTree RPAREN47_tree=null;

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 12) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:128:25: ( NEW IDENTIFIER LPAREN ( argList )? RPAREN )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:128:27: NEW IDENTIFIER LPAREN ( argList )? RPAREN
            {
            root_0 = (KynTree)adaptor.nil();

            NEW43=(Token)match(input,NEW,FOLLOW_NEW_in_newObject1117); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            NEW43_tree = (KynTree)adaptor.create(NEW43);
            root_0 = (KynTree)adaptor.becomeRoot(NEW43_tree, root_0);
            }
            IDENTIFIER44=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_newObject1120); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            IDENTIFIER44_tree = (KynTree)adaptor.create(IDENTIFIER44);
            adaptor.addChild(root_0, IDENTIFIER44_tree);
            }
            LPAREN45=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_newObject1122); if (state.failed) return retval;
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:128:51: ( argList )?
            int alt11=2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0==IDENTIFIER||LA11_0==NEW||(LA11_0>=TRUE && LA11_0<=CHARACTERLITERAL)) ) {
                alt11=1;
            }
            switch (alt11) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:0:0: argList
                    {
                    pushFollow(FOLLOW_argList_in_newObject1125);
                    argList46=argList();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, argList46.getTree());

                    }
                    break;

            }

            RPAREN47=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_newObject1128); if (state.failed) return retval;

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 12, newObject_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "newObject"

    public static class variableOrMethodAccess_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "variableOrMethodAccess"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:131:1: variableOrMethodAccess : ( variableAccess | methodAccess );
    public final KohYaoNoiParser.variableOrMethodAccess_return variableOrMethodAccess() throws RecognitionException {
        KohYaoNoiParser.variableOrMethodAccess_return retval = new KohYaoNoiParser.variableOrMethodAccess_return();
        retval.start = input.LT(1);
        int variableOrMethodAccess_StartIndex = input.index();
        KynTree root_0 = null;

        KohYaoNoiParser.variableAccess_return variableAccess48 = null;

        KohYaoNoiParser.methodAccess_return methodAccess49 = null;



        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 13) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:131:25: ( variableAccess | methodAccess )
            int alt12=2;
            int LA12_0 = input.LA(1);

            if ( (LA12_0==IDENTIFIER) ) {
                int LA12_1 = input.LA(2);

                if ( (LA12_1==LPAREN) ) {
                    alt12=2;
                }
                else if ( (LA12_1==EOF||LA12_1==SEMI||LA12_1==IDENTIFIER||LA12_1==HASH||(LA12_1>=COMMA && LA12_1<=RPAREN)||LA12_1==DOT) ) {
                    alt12=1;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 12, 1, input);

                    throw nvae;
                }
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 12, 0, input);

                throw nvae;
            }
            switch (alt12) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:131:27: variableAccess
                    {
                    root_0 = (KynTree)adaptor.nil();

                    pushFollow(FOLLOW_variableAccess_in_variableOrMethodAccess1163);
                    variableAccess48=variableAccess();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, variableAccess48.getTree());

                    }
                    break;
                case 2 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:132:27: methodAccess
                    {
                    root_0 = (KynTree)adaptor.nil();

                    pushFollow(FOLLOW_methodAccess_in_variableOrMethodAccess1191);
                    methodAccess49=methodAccess();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, methodAccess49.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 13, variableOrMethodAccess_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "variableOrMethodAccess"

    public static class variableAccess_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "variableAccess"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:135:1: variableAccess : IDENTIFIER ( DOT variableOrMethodAccess )? -> ^( VARACC IDENTIFIER ( variableOrMethodAccess )? ) ;
    public final KohYaoNoiParser.variableAccess_return variableAccess() throws RecognitionException {
        KohYaoNoiParser.variableAccess_return retval = new KohYaoNoiParser.variableAccess_return();
        retval.start = input.LT(1);
        int variableAccess_StartIndex = input.index();
        KynTree root_0 = null;

        Token IDENTIFIER50=null;
        Token DOT51=null;
        KohYaoNoiParser.variableOrMethodAccess_return variableOrMethodAccess52 = null;


        KynTree IDENTIFIER50_tree=null;
        KynTree DOT51_tree=null;
        RewriteRuleTokenStream stream_DOT=new RewriteRuleTokenStream(adaptor,"token DOT");
        RewriteRuleTokenStream stream_IDENTIFIER=new RewriteRuleTokenStream(adaptor,"token IDENTIFIER");
        RewriteRuleSubtreeStream stream_variableOrMethodAccess=new RewriteRuleSubtreeStream(adaptor,"rule variableOrMethodAccess");
        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:135:25: ( IDENTIFIER ( DOT variableOrMethodAccess )? -> ^( VARACC IDENTIFIER ( variableOrMethodAccess )? ) )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:135:27: IDENTIFIER ( DOT variableOrMethodAccess )?
            {
            IDENTIFIER50=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_variableAccess1245); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_IDENTIFIER.add(IDENTIFIER50);

            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:135:38: ( DOT variableOrMethodAccess )?
            int alt13=2;
            int LA13_0 = input.LA(1);

            if ( (LA13_0==DOT) ) {
                alt13=1;
            }
            switch (alt13) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:135:40: DOT variableOrMethodAccess
                    {
                    DOT51=(Token)match(input,DOT,FOLLOW_DOT_in_variableAccess1249); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_DOT.add(DOT51);

                    pushFollow(FOLLOW_variableOrMethodAccess_in_variableAccess1251);
                    variableOrMethodAccess52=variableOrMethodAccess();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_variableOrMethodAccess.add(variableOrMethodAccess52.getTree());

                    }
                    break;

            }



            // AST REWRITE
            // elements: IDENTIFIER, variableOrMethodAccess
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (KynTree)adaptor.nil();
            // 135:70: -> ^( VARACC IDENTIFIER ( variableOrMethodAccess )? )
            {
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:135:73: ^( VARACC IDENTIFIER ( variableOrMethodAccess )? )
                {
                KynTree root_1 = (KynTree)adaptor.nil();
                root_1 = (KynTree)adaptor.becomeRoot((KynTree)adaptor.create(VARACC, "VARACC"), root_1);

                adaptor.addChild(root_1, stream_IDENTIFIER.nextNode());
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:135:93: ( variableOrMethodAccess )?
                if ( stream_variableOrMethodAccess.hasNext() ) {
                    adaptor.addChild(root_1, stream_variableOrMethodAccess.nextTree());

                }
                stream_variableOrMethodAccess.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 14, variableAccess_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "variableAccess"

    public static class methodAccess_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "methodAccess"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:138:1: methodAccess : IDENTIFIER LPAREN ( argList )? RPAREN ( DOT variableOrMethodAccess )? -> ^( METACC IDENTIFIER ( argList )? ( variableOrMethodAccess )? ) ;
    public final KohYaoNoiParser.methodAccess_return methodAccess() throws RecognitionException {
        KohYaoNoiParser.methodAccess_return retval = new KohYaoNoiParser.methodAccess_return();
        retval.start = input.LT(1);
        int methodAccess_StartIndex = input.index();
        KynTree root_0 = null;

        Token IDENTIFIER53=null;
        Token LPAREN54=null;
        Token RPAREN56=null;
        Token DOT57=null;
        KohYaoNoiParser.argList_return argList55 = null;

        KohYaoNoiParser.variableOrMethodAccess_return variableOrMethodAccess58 = null;


        KynTree IDENTIFIER53_tree=null;
        KynTree LPAREN54_tree=null;
        KynTree RPAREN56_tree=null;
        KynTree DOT57_tree=null;
        RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
        RewriteRuleTokenStream stream_DOT=new RewriteRuleTokenStream(adaptor,"token DOT");
        RewriteRuleTokenStream stream_IDENTIFIER=new RewriteRuleTokenStream(adaptor,"token IDENTIFIER");
        RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
        RewriteRuleSubtreeStream stream_argList=new RewriteRuleSubtreeStream(adaptor,"rule argList");
        RewriteRuleSubtreeStream stream_variableOrMethodAccess=new RewriteRuleSubtreeStream(adaptor,"rule variableOrMethodAccess");
        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:138:25: ( IDENTIFIER LPAREN ( argList )? RPAREN ( DOT variableOrMethodAccess )? -> ^( METACC IDENTIFIER ( argList )? ( variableOrMethodAccess )? ) )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:138:27: IDENTIFIER LPAREN ( argList )? RPAREN ( DOT variableOrMethodAccess )?
            {
            IDENTIFIER53=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_methodAccess1321); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_IDENTIFIER.add(IDENTIFIER53);

            LPAREN54=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_methodAccess1323); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN54);

            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:138:45: ( argList )?
            int alt14=2;
            int LA14_0 = input.LA(1);

            if ( (LA14_0==IDENTIFIER||LA14_0==NEW||(LA14_0>=TRUE && LA14_0<=CHARACTERLITERAL)) ) {
                alt14=1;
            }
            switch (alt14) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:0:0: argList
                    {
                    pushFollow(FOLLOW_argList_in_methodAccess1325);
                    argList55=argList();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_argList.add(argList55.getTree());

                    }
                    break;

            }

            RPAREN56=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_methodAccess1328); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN56);

            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:139:29: ( DOT variableOrMethodAccess )?
            int alt15=2;
            int LA15_0 = input.LA(1);

            if ( (LA15_0==DOT) ) {
                alt15=1;
            }
            switch (alt15) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:139:31: DOT variableOrMethodAccess
                    {
                    DOT57=(Token)match(input,DOT,FOLLOW_DOT_in_methodAccess1360); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_DOT.add(DOT57);

                    pushFollow(FOLLOW_variableOrMethodAccess_in_methodAccess1362);
                    variableOrMethodAccess58=variableOrMethodAccess();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_variableOrMethodAccess.add(variableOrMethodAccess58.getTree());

                    }
                    break;

            }



            // AST REWRITE
            // elements: variableOrMethodAccess, IDENTIFIER, argList
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (KynTree)adaptor.nil();
            // 139:60: -> ^( METACC IDENTIFIER ( argList )? ( variableOrMethodAccess )? )
            {
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:139:63: ^( METACC IDENTIFIER ( argList )? ( variableOrMethodAccess )? )
                {
                KynTree root_1 = (KynTree)adaptor.nil();
                root_1 = (KynTree)adaptor.becomeRoot((KynTree)adaptor.create(METACC, "METACC"), root_1);

                adaptor.addChild(root_1, stream_IDENTIFIER.nextNode());
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:139:83: ( argList )?
                if ( stream_argList.hasNext() ) {
                    adaptor.addChild(root_1, stream_argList.nextTree());

                }
                stream_argList.reset();
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:139:92: ( variableOrMethodAccess )?
                if ( stream_variableOrMethodAccess.hasNext() ) {
                    adaptor.addChild(root_1, stream_variableOrMethodAccess.nextTree());

                }
                stream_variableOrMethodAccess.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 15, methodAccess_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "methodAccess"

    public static class argList_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "argList"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:142:1: argList : value ( COMMA value )* -> ^( ARGLIST ( value )+ ) ;
    public final KohYaoNoiParser.argList_return argList() throws RecognitionException {
        KohYaoNoiParser.argList_return retval = new KohYaoNoiParser.argList_return();
        retval.start = input.LT(1);
        int argList_StartIndex = input.index();
        KynTree root_0 = null;

        Token COMMA60=null;
        KohYaoNoiParser.value_return value59 = null;

        KohYaoNoiParser.value_return value61 = null;


        KynTree COMMA60_tree=null;
        RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
        RewriteRuleSubtreeStream stream_value=new RewriteRuleSubtreeStream(adaptor,"rule value");
        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 16) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:142:25: ( value ( COMMA value )* -> ^( ARGLIST ( value )+ ) )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:142:27: value ( COMMA value )*
            {
            pushFollow(FOLLOW_value_in_argList1439);
            value59=value();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_value.add(value59.getTree());
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:142:33: ( COMMA value )*
            loop16:
            do {
                int alt16=2;
                int LA16_0 = input.LA(1);

                if ( (LA16_0==COMMA) ) {
                    alt16=1;
                }


                switch (alt16) {
            	case 1 :
            	    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:142:35: COMMA value
            	    {
            	    COMMA60=(Token)match(input,COMMA,FOLLOW_COMMA_in_argList1443); if (state.failed) return retval; 
            	    if ( state.backtracking==0 ) stream_COMMA.add(COMMA60);

            	    pushFollow(FOLLOW_value_in_argList1445);
            	    value61=value();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_value.add(value61.getTree());

            	    }
            	    break;

            	default :
            	    break loop16;
                }
            } while (true);



            // AST REWRITE
            // elements: value
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (KynTree)adaptor.nil();
            // 142:50: -> ^( ARGLIST ( value )+ )
            {
                // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:142:53: ^( ARGLIST ( value )+ )
                {
                KynTree root_1 = (KynTree)adaptor.nil();
                root_1 = (KynTree)adaptor.becomeRoot((KynTree)adaptor.create(ARGLIST, "ARGLIST"), root_1);

                if ( !(stream_value.hasNext()) ) {
                    throw new RewriteEarlyExitException();
                }
                while ( stream_value.hasNext() ) {
                    adaptor.addChild(root_1, stream_value.nextTree());

                }
                stream_value.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 16, argList_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "argList"

    public static class qualifiedName_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "qualifiedName"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:145:1: qualifiedName : IDENTIFIER ( DOT IDENTIFIER )* -> ( IDENTIFIER )+ ;
    public final KohYaoNoiParser.qualifiedName_return qualifiedName() throws RecognitionException {
        KohYaoNoiParser.qualifiedName_return retval = new KohYaoNoiParser.qualifiedName_return();
        retval.start = input.LT(1);
        int qualifiedName_StartIndex = input.index();
        KynTree root_0 = null;

        Token IDENTIFIER62=null;
        Token DOT63=null;
        Token IDENTIFIER64=null;

        KynTree IDENTIFIER62_tree=null;
        KynTree DOT63_tree=null;
        KynTree IDENTIFIER64_tree=null;
        RewriteRuleTokenStream stream_DOT=new RewriteRuleTokenStream(adaptor,"token DOT");
        RewriteRuleTokenStream stream_IDENTIFIER=new RewriteRuleTokenStream(adaptor,"token IDENTIFIER");

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 17) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:145:25: ( IDENTIFIER ( DOT IDENTIFIER )* -> ( IDENTIFIER )+ )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:145:27: IDENTIFIER ( DOT IDENTIFIER )*
            {
            IDENTIFIER62=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qualifiedName1512); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_IDENTIFIER.add(IDENTIFIER62);

            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:145:38: ( DOT IDENTIFIER )*
            loop17:
            do {
                int alt17=2;
                int LA17_0 = input.LA(1);

                if ( (LA17_0==DOT) ) {
                    alt17=1;
                }


                switch (alt17) {
            	case 1 :
            	    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:145:40: DOT IDENTIFIER
            	    {
            	    DOT63=(Token)match(input,DOT,FOLLOW_DOT_in_qualifiedName1516); if (state.failed) return retval; 
            	    if ( state.backtracking==0 ) stream_DOT.add(DOT63);

            	    IDENTIFIER64=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qualifiedName1518); if (state.failed) return retval; 
            	    if ( state.backtracking==0 ) stream_IDENTIFIER.add(IDENTIFIER64);


            	    }
            	    break;

            	default :
            	    break loop17;
                }
            } while (true);



            // AST REWRITE
            // elements: IDENTIFIER
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            // wildcard labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

            root_0 = (KynTree)adaptor.nil();
            // 145:58: -> ( IDENTIFIER )+
            {
                if ( !(stream_IDENTIFIER.hasNext()) ) {
                    throw new RewriteEarlyExitException();
                }
                while ( stream_IDENTIFIER.hasNext() ) {
                    adaptor.addChild(root_0, stream_IDENTIFIER.nextNode());

                }
                stream_IDENTIFIER.reset();

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 17, qualifiedName_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "qualifiedName"

    public static class booleanLiteral_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "booleanLiteral"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:148:1: booleanLiteral : ( TRUE | FALSE );
    public final KohYaoNoiParser.booleanLiteral_return booleanLiteral() throws RecognitionException {
        KohYaoNoiParser.booleanLiteral_return retval = new KohYaoNoiParser.booleanLiteral_return();
        retval.start = input.LT(1);
        int booleanLiteral_StartIndex = input.index();
        KynTree root_0 = null;

        Token set65=null;

        KynTree set65_tree=null;

        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 18) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:148:25: ( TRUE | FALSE )
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:
            {
            root_0 = (KynTree)adaptor.nil();

            set65=(Token)input.LT(1);
            if ( (input.LA(1)>=TRUE && input.LA(1)<=FALSE) ) {
                input.consume();
                if ( state.backtracking==0 ) adaptor.addChild(root_0, (KynTree)adaptor.create(set65));
                state.errorRecovery=false;state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 18, booleanLiteral_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "booleanLiteral"

    public static class literal_return extends ParserRuleReturnScope {
        KynTree tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "literal"
    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:152:1: literal : ( INTEGER | FLOAT | STRINGLITERAL | CHARACTERLITERAL | booleanLiteral -> ^( BOOL booleanLiteral ) );
    public final KohYaoNoiParser.literal_return literal() throws RecognitionException {
        KohYaoNoiParser.literal_return retval = new KohYaoNoiParser.literal_return();
        retval.start = input.LT(1);
        int literal_StartIndex = input.index();
        KynTree root_0 = null;

        Token INTEGER66=null;
        Token FLOAT67=null;
        Token STRINGLITERAL68=null;
        Token CHARACTERLITERAL69=null;
        KohYaoNoiParser.booleanLiteral_return booleanLiteral70 = null;


        KynTree INTEGER66_tree=null;
        KynTree FLOAT67_tree=null;
        KynTree STRINGLITERAL68_tree=null;
        KynTree CHARACTERLITERAL69_tree=null;
        RewriteRuleSubtreeStream stream_booleanLiteral=new RewriteRuleSubtreeStream(adaptor,"rule booleanLiteral");
        try {
            if ( state.backtracking>0 && alreadyParsedRule(input, 19) ) { return retval; }
            // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:152:25: ( INTEGER | FLOAT | STRINGLITERAL | CHARACTERLITERAL | booleanLiteral -> ^( BOOL booleanLiteral ) )
            int alt18=5;
            switch ( input.LA(1) ) {
            case INTEGER:
                {
                alt18=1;
                }
                break;
            case FLOAT:
                {
                alt18=2;
                }
                break;
            case STRINGLITERAL:
                {
                alt18=3;
                }
                break;
            case CHARACTERLITERAL:
                {
                alt18=4;
                }
                break;
            case TRUE:
            case FALSE:
                {
                alt18=5;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 18, 0, input);

                throw nvae;
            }

            switch (alt18) {
                case 1 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:152:27: INTEGER
                    {
                    root_0 = (KynTree)adaptor.nil();

                    INTEGER66=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_literal1669); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    INTEGER66_tree = (KynTree)adaptor.create(INTEGER66);
                    adaptor.addChild(root_0, INTEGER66_tree);
                    }

                    }
                    break;
                case 2 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:153:27: FLOAT
                    {
                    root_0 = (KynTree)adaptor.nil();

                    FLOAT67=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_literal1697); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    FLOAT67_tree = (KynTree)adaptor.create(FLOAT67);
                    adaptor.addChild(root_0, FLOAT67_tree);
                    }

                    }
                    break;
                case 3 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:154:27: STRINGLITERAL
                    {
                    root_0 = (KynTree)adaptor.nil();

                    STRINGLITERAL68=(Token)match(input,STRINGLITERAL,FOLLOW_STRINGLITERAL_in_literal1725); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    STRINGLITERAL68_tree = (KynTree)adaptor.create(STRINGLITERAL68);
                    adaptor.addChild(root_0, STRINGLITERAL68_tree);
                    }

                    }
                    break;
                case 4 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:155:27: CHARACTERLITERAL
                    {
                    root_0 = (KynTree)adaptor.nil();

                    CHARACTERLITERAL69=(Token)match(input,CHARACTERLITERAL,FOLLOW_CHARACTERLITERAL_in_literal1753); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    CHARACTERLITERAL69_tree = (KynTree)adaptor.create(CHARACTERLITERAL69);
                    adaptor.addChild(root_0, CHARACTERLITERAL69_tree);
                    }

                    }
                    break;
                case 5 :
                    // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:156:27: booleanLiteral
                    {
                    pushFollow(FOLLOW_booleanLiteral_in_literal1781);
                    booleanLiteral70=booleanLiteral();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_booleanLiteral.add(booleanLiteral70.getTree());


                    // AST REWRITE
                    // elements: booleanLiteral
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    // wildcard labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);

                    root_0 = (KynTree)adaptor.nil();
                    // 156:42: -> ^( BOOL booleanLiteral )
                    {
                        // D:\\My Dropbox\\development\\eclipse\\KohYaoNoi\\src\\ch\\kynlang\\compiler\\KohYaoNoi.g:156:45: ^( BOOL booleanLiteral )
                        {
                        KynTree root_1 = (KynTree)adaptor.nil();
                        root_1 = (KynTree)adaptor.becomeRoot((KynTree)adaptor.create(BOOL, "BOOL"), root_1);

                        adaptor.addChild(root_1, stream_booleanLiteral.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (KynTree)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (KynTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            if ( state.backtracking>0 ) { memoize(input, 19, literal_StartIndex); }
        }
        return retval;
    }
    // $ANTLR end "literal"

    // Delegated rules


    protected DFA4 dfa4 = new DFA4(this);
    static final String DFA4_eotS =
        "\7\uffff";
    static final String DFA4_eofS =
        "\7\uffff";
    static final String DFA4_minS =
        "\1\16\1\20\1\15\1\20\2\uffff\1\15";
    static final String DFA4_maxS =
        "\1\16\1\20\1\33\1\20\2\uffff\1\33";
    static final String DFA4_acceptS =
        "\4\uffff\1\1\1\2\1\uffff";
    static final String DFA4_specialS =
        "\7\uffff}>";
    static final String[] DFA4_transitionS = {
            "\1\1",
            "\1\2",
            "\1\5\1\uffff\1\4\13\uffff\1\3",
            "\1\6",
            "",
            "",
            "\1\5\1\uffff\1\4\13\uffff\1\3"
    };

    static final short[] DFA4_eot = DFA.unpackEncodedString(DFA4_eotS);
    static final short[] DFA4_eof = DFA.unpackEncodedString(DFA4_eofS);
    static final char[] DFA4_min = DFA.unpackEncodedStringToUnsignedChars(DFA4_minS);
    static final char[] DFA4_max = DFA.unpackEncodedStringToUnsignedChars(DFA4_maxS);
    static final short[] DFA4_accept = DFA.unpackEncodedString(DFA4_acceptS);
    static final short[] DFA4_special = DFA.unpackEncodedString(DFA4_specialS);
    static final short[][] DFA4_transition;

    static {
        int numStates = DFA4_transitionS.length;
        DFA4_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA4_transition[i] = DFA.unpackEncodedString(DFA4_transitionS[i]);
        }
    }

    class DFA4 extends DFA {

        public DFA4(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 4;
            this.eot = DFA4_eot;
            this.eof = DFA4_eof;
            this.min = DFA4_min;
            this.max = DFA4_max;
            this.accept = DFA4_accept;
            this.special = DFA4_special;
            this.transition = DFA4_transition;
        }
        public String getDescription() {
            return "96:1: importDef : ( IMPORT qualifiedName AS IDENTIFIER SEMI -> ^( AS IDENTIFIER qualifiedName ) | IMPORT qualifiedName SEMI );";
        }
    }
 

    public static final BitSet FOLLOW_packageDef_in_program136 = new BitSet(new long[]{0x00000000000B4000L});
    public static final BitSet FOLLOW_importDef_in_program167 = new BitSet(new long[]{0x00000000000B4000L});
    public static final BitSet FOLLOW_macroDef_in_program199 = new BitSet(new long[]{0x00000000000B4000L});
    public static final BitSet FOLLOW_varDef_in_program203 = new BitSet(new long[]{0x00000000000B4000L});
    public static final BitSet FOLLOW_widget_in_program235 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PACKAGE_in_packageDef281 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_qualifiedName_in_packageDef284 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_SEMI_in_packageDef286 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IMPORT_in_importDef346 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_qualifiedName_in_importDef348 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_AS_in_importDef350 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_IDENTIFIER_in_importDef352 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_SEMI_in_importDef354 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IMPORT_in_importDef392 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_qualifiedName_in_importDef395 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_SEMI_in_importDef397 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DEF_in_varDef460 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_IDENTIFIER_in_varDef463 = new BitSet(new long[]{0x0000000000040000L});
    public static final BitSet FOLLOW_EQ_in_varDef465 = new BitSet(new long[]{0x00000003F4010000L});
    public static final BitSet FOLLOW_value_in_varDef468 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_SEMI_in_varDef470 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_HASH_in_macroDef531 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_IDENTIFIER_in_macroDef534 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_propertyBody_in_macroDef536 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_HASH_in_macroAccess631 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_IDENTIFIER_in_macroAccess634 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LPAREN_in_propertyBody690 = new BitSet(new long[]{0x0000000000490000L});
    public static final BitSet FOLLOW_property_in_propertyBody694 = new BitSet(new long[]{0x0000000000690000L});
    public static final BitSet FOLLOW_COMMA_in_propertyBody696 = new BitSet(new long[]{0x0000000000490000L});
    public static final BitSet FOLLOW_RPAREN_in_propertyBody702 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDENTIFIER_in_property771 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_COLON_in_property773 = new BitSet(new long[]{0x00000003F4010000L});
    public static final BitSet FOLLOW_value_in_property775 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_macroAccess_in_property813 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDENTIFIER_in_widget877 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_IDENTIFIER_in_widget881 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_propertyBody_in_widget883 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_widgetBody_in_widget885 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LBRACE_in_widgetBody949 = new BitSet(new long[]{0x00000000020B4000L});
    public static final BitSet FOLLOW_widget_in_widgetBody951 = new BitSet(new long[]{0x00000000020B4000L});
    public static final BitSet FOLLOW_RBRACE_in_widgetBody954 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_literal_in_value1014 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_newObject_in_value1042 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_variableAccess_in_value1070 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NEW_in_newObject1117 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_IDENTIFIER_in_newObject1120 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_LPAREN_in_newObject1122 = new BitSet(new long[]{0x00000003F4410000L});
    public static final BitSet FOLLOW_argList_in_newObject1125 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_RPAREN_in_newObject1128 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_variableAccess_in_variableOrMethodAccess1163 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_methodAccess_in_variableOrMethodAccess1191 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDENTIFIER_in_variableAccess1245 = new BitSet(new long[]{0x0000000008000002L});
    public static final BitSet FOLLOW_DOT_in_variableAccess1249 = new BitSet(new long[]{0x00000003F4010000L});
    public static final BitSet FOLLOW_variableOrMethodAccess_in_variableAccess1251 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IDENTIFIER_in_methodAccess1321 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_LPAREN_in_methodAccess1323 = new BitSet(new long[]{0x00000003F4410000L});
    public static final BitSet FOLLOW_argList_in_methodAccess1325 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_RPAREN_in_methodAccess1328 = new BitSet(new long[]{0x0000000008000002L});
    public static final BitSet FOLLOW_DOT_in_methodAccess1360 = new BitSet(new long[]{0x00000003F4010000L});
    public static final BitSet FOLLOW_variableOrMethodAccess_in_methodAccess1362 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_value_in_argList1439 = new BitSet(new long[]{0x0000000000200002L});
    public static final BitSet FOLLOW_COMMA_in_argList1443 = new BitSet(new long[]{0x00000003F4010000L});
    public static final BitSet FOLLOW_value_in_argList1445 = new BitSet(new long[]{0x0000000000200002L});
    public static final BitSet FOLLOW_IDENTIFIER_in_qualifiedName1512 = new BitSet(new long[]{0x0000000008000002L});
    public static final BitSet FOLLOW_DOT_in_qualifiedName1516 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_IDENTIFIER_in_qualifiedName1518 = new BitSet(new long[]{0x0000000008000002L});
    public static final BitSet FOLLOW_set_in_booleanLiteral0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INTEGER_in_literal1669 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FLOAT_in_literal1697 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STRINGLITERAL_in_literal1725 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CHARACTERLITERAL_in_literal1753 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_booleanLiteral_in_literal1781 = new BitSet(new long[]{0x0000000000000002L});

}